package com.buba.springcloud.service.impl;

import com.buba.springcloud.dao.FoodMapper;
import com.buba.springcloud.entities.HfFoods;
import com.buba.springcloud.service.FoodService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author taodeyu
 * @Date 2021/12/29 上午 11:44
 * @Version 1.0
 */
@Service
public class FoodServiceImpl implements FoodService {
    @Resource
    private FoodMapper foodMapper;

    @Override
    public List<HfFoods> getAllFood(String foodName,Integer foodType,Integer foodStatus) {
        return foodMapper.getAllFood(foodName,foodType,foodStatus);
    }

    @Override
    public Integer saveFood(HfFoods hfFoods) {
        return foodMapper.saveFood(hfFoods);
    }

    @Override
    public Integer deleteFoodById(Integer id) {
        return foodMapper.deleteFoodById(id);
    }

    @Override
    public Integer updateFood(HfFoods hfFoods) {
        return foodMapper.updateFood(hfFoods);
    }

    @Override
    public Integer updateFoodStatus(HfFoods hfFoods) {
        return foodMapper.updateFoodStatus(hfFoods);
    }
}
